<?php
/**
 * Created by PhpStorm.
 * User: 哇咔咔
 * Date: 17-9-4
 * Time: 上午11:17
 */

defined('BASEPATH') OR exit('No direct script access allowed');

class Profile extends MY_Controller {

    //公司简介
    function gsjj(){
        $data['company'] = parent::company();//公司基本信息
        $column = parent::column('基础信息');
        $data['url'] =parent::pic_url($data['company'] ['id']);
        $arr = array(
            'company_id'=>$data['company'] ['id'],
            'pic_type' =>  '02',
            'del_flag' =>  '0',
            'column_id' => $column['id']
        );
        //获取栏目主图
        $data['pic'] = $this->db->from('picture')->where($arr)->get()->row_array();
        $this->load->view('profile/gsjj',$data);
    }
    //团队
    function team(){
        $data['company'] = parent::company();//公司基本信息
        $data['url'] =parent::pic_url($data['company'] ['id']);
        $arr1 = parent::arr();
        //获取团队人员列表
        $data['team'] = $this->db->from('team_info')->where($arr1)->order_by('create_by','desc')->get()->result_array();
        $this->load->view('profile/team_list',$data);
    }
    //发展历程
    function history(){
        $data['company'] = parent::company();//公司基本信息
        $data['url'] =parent::pic_url($data['company'] ['id']);
        $arr1 = parent::arr();
        //获取发展历程列表
        $data['history'] = $this->db->from('history')->where($arr1)->get()->result_array();

        $this->load->view('profile/history_list',$data);
    }
    //团队人员的详细信息
    function team_info(){
        $id = $this->uri->segment(4);
        $data['company'] = parent::company();//公司基本信息
        $data['url'] =parent::pic_url($data['company'] ['id']);
        $arr = parent::arr_id($id);
        //获取团队人员的详细信息
        $data['team'] = $this->db->from('team_info')->where($arr)->get()->row_array();
        $this->load->view('profile/team_show',$data);

    }
}